package com.sdppf.dao.impl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.sdppf.dao.DeveloperDao;
import com.sdppf.domain.Developer;

public class DeveloperImpl extends HibernateDaoSupport implements DeveloperDao {

	public void deleteDeveloper(Developer developer) {
		this.getHibernateTemplate().delete(developer);
	}

	public Developer queryDeveloper(int developerId) {
		return (Developer) this.getHibernateTemplate().get(Developer.class,
				developerId);
	}

	public void saveDeveloper(Developer developer) {
		this.getHibernateTemplate().save(developer);
	}

	public void updateDeveloper(Developer developer) {
		this.getHibernateTemplate().update(developer);
	}

	public List<Developer> queryDevelopers() {
		return this.getHibernateTemplate().find("from Developer as d");
	}

}
